#pragma once
#include "shapebuilder.h"

#define CYLINDER_GUID _T("BECC904D-ED18-499B-9A28-037F71D3488C")
class TFunction_Logbook;
class CCylinderInfo : public CShapeInfo
{
public:
	CCylinderInfo();
	~CCylinderInfo();
	virtual void Reset(void);

	virtual void GetParams(CVarList& varList, UINT nID);
	virtual void SetParams(const CVarList& varList, UINT nID);

	virtual bool GetFromLabel(TDF_Label& label);
	virtual void AddToLabel(TDF_Label& label);
	virtual bool ModifyLabel(TDF_Label& label, TFunction_Logbook& log);

	static bool IsModified(TDF_Label& label, const TFunction_Logbook& log);
	//-----------------------------------
	gp_Pnt	ptCenter;
	Standard_Real dRadius;
	gp_Dir dir;
	Standard_Real dHeight;
	//----------------------------------
	enum PARAM_INDEX_SPHERE
	{
		IDX_START = 0,

		CENTER_POINT = 1,
		CENTER_X = CENTER_POINT,
		CENTER_Y,
		CENTER_Z,

		RADIUS = 4,

		DIRECTION = 5,
		DIR_X = DIRECTION,
		DIR_Y,
		DIR_Z,
		
		HEIGHT = 8,

		IDX_END
	};
};


class CCylinderBuilder :
	public CShapeBuilder
{
public:
	CCylinderBuilder(void);
	~CCylinderBuilder(void);

	bool Build(const CString& szCmdParam, TopoDS_Shape& shape);
	bool Build(CCylinderInfo* pShapeInfo, TopoDS_Shape& shape);
};
